URL='http://localhost:8601/';
var token= localStorage.getExpire("token");
function deleteArticle(article_id) {
    layer.confirm('真的删除行么', function (index) {
        layer.close(index);
        //向服务端发送删除指令
        $.ajax({
            xhrFields: {
                withCredentials: true
            },
            headers:{"Authorization":token},
            url:URL+'Article/deleteArticle',
            data:{article_id: article_id},
            dataType: 'json',
            type: 'post',
            success: function (data) {
                if(data==1){
                    layer.msg('删除成功200', {
                        time: 2000 //2秒关闭（如果不配置，默认是3秒）
                    }, function () {
                        location.reload(true);
                    })
                }else{
                    layer.msg(data.msg, {time: 3000});
                }
            }
        })

    });
}